package rattlesnake.callback.server.handler;

import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.http.HttpObject;
import io.netty.handler.codec.http.HttpRequest;
import rattlesnake.callback.aop.annotation.Handler;
import rattlesnake.callback.http.ResponseStatus;
import rattlesnake.callback.server.HandlerAdapter;
import rattlesnake.callback.util.HttpAsyncUtil;

/**
 * @Package: rattlesnake.callback.server.handler
 * @Description: POST方式处理
 * @author: liuxin
 * @date: 17/4/12 下午3:57
 */
@Handler(value = {"chinapay"})
public class PostMethHandler implements HandlerAdapter {
    @Override
    public void forWard(ChannelHandlerContext ctx, HttpRequest request, HttpObject msg, String categoryUrl) {
        HttpAsyncUtil.doPostExecute(ctx,request,msg,categoryUrl, ResponseStatus.CHINA_SUCCESS,ResponseStatus.CHINA_ERROR);
    }
}
